@extends('admin.register.common')
<style>
    .error{
        color:red;
    }
</style>
@section('content')
    <form action="" method="post" class="form-horizontal" id="password_form">
        {{csrf_field()}}
        <input type="hidden" name="id" value="{{$id}}">
        <div class="form-group">
            <label for="exampleInputAccount9" class="col-sm-5">登录密码：</label>
            <div class="col-md-3 col-sm-3">
                <input type="password" id="password" class="form-control" name="password" placeholder="请输入登录密码">
            </div>
        </div>
        <div class="form-group">
            <label for="exampleInputPassword4" class="col-sm-5">确认密码：</label>
            <div class="col-md-3 col-sm-3">
                <input type="password" class="form-control" name="password_confirmation" placeholder="请确认密码">
            </div>
        </div>
        <div class="form-group btnBox">
            <div class="col-sm-12">
                <button type="submit" class="btn btn-danger">下一步</button>
            </div>
        </div>
        <div class="form-group text">
            <div>注：为了您的作品安全，请妥善保存账号密码，切勿随意泄露</div>
        </div>
        @if (count($errors) > 0)
            <div class="alert alert-danger">
                <ul>
                    @foreach ($errors->all() as $error)
                        <li>{{$error}}</li>
                    @endforeach
                </ul>
            </div>
        @endif
    </form>
    @include('flash::message')
    <script>
        $(function(){
            $('#password_form').validate({
                rules: {
                    password: {
                        required: true,
                        minlength: 5
                    },
                    password_confirmation: {
                        required: true,
                        minlength: 5,
                        equalTo: "#password"
                    },
                },
                message: {
                    password: {
                        required: true,
                        minlength: 5,
                    },
                    password_confirmation: {
                        required: true,
                        minlength: 5,
                        equalTo: "#password"
                    },
                }

            });
        })
    </script>
@endsection
